package com.xiaolin.designmode.flyweight;

/**
 * @ClassName ConcreteFlyweight
 * @Description 具体享元角色
 * @Detail detail
 * @Author MyPC
 * @Date 2020/11/3
 * @Version 1.0
 */
public class ConcreteFlyweight implements Flyweight {
    private String key;
    public ConcreteFlyweight(String key){
        this.key=key;
        System.out.println("具体享元对象"+key+"被创建");
    }
    @Override
    public void operation(UnsharableFlyweight unsharableFlyweight) {
        System.out.println("具体享元对象"+key+"被调用");
        System.out.println("非享元信息："+unsharableFlyweight.getInfo());
    }
}
